<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/static/js/jquery-1.4.4.min.js"></script>

<script type="text/javascript">
		function ch(){
				$("#body").hide();
			/* $.post($("#form").attr("action"),$("#form").serialize(),function(string){
				alert(string);
				if(string=="main"){
					
					}
			}); */
			$.ajax({
					url:$("#form").attr("action"),
					type:"post",
					async: false,
					data:$("#form").serialize(),
					success : function(string){alert(string);
					window.parent.$('#tabs').tabs('close', "添加员工");
					}	
			});
			
			 
		}
		
</script>
<style type="text/css">
#frame{
	position:absolute;
	top:30px;
	right:40px;
	width:300px;
	height:400px;
	border:1px solid blue;}
</style>
</head>
<body id="body">
<div>
<%-- action="<%=request.getContextPath() %>/employ/addsave" --%>

	<form id="form" action="<%=request.getContextPath() %>/employ/addsave" method="post">
		姓名:<input type="text" name="name"/><br/>
		性别:<input type="radio" name="sex" value="男" checked="checked"/>男 &nbsp;
		<input type="radio" name="sex" value="女" />女<br/>
		部门:<input type="text" name="deptno" /><br/>
		<input name="face" type="text" value="<%=request.getServletContext().getRealPath("") %>${path }" hidden="hidden"/>
		<input name="photoname" type="text" hidden="hidden" value="${path }"/>
		<input type="button" onclick="ch()" value="提交">&nbsp; <input type="reset" value="重置"/>
	</form>
	
	  <div <c:if test="${path==null }">hidden="hidden"</c:if>	 id="frame">
		头像:<img width="200px" src="<%=request.getContextPath() %>${path }"  />首页可拍照<br/>
		</div>
</div>
</body>
</html>